import requests, json

# 表单数据
form_data = {
    "page": 1,
    "limit": 5,
}
url = "http://www.layui.com/demo/table/user"
response = requests.get(url=url, params=form_data)
if response.status_code == 200:
    if len(response.text) > 0:
        emp = json.loads(response.text)
        for k, v in emp.items():
            print(k, '>>>', v)
        with open(file='layui.json', mode='w', encoding='utf-8') as f:
            f.write(response.text)
